import Vue from 'vue'
import VueRouter from 'vue-router'
// import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/login/index.vue')
  },
  {
    path: '/requ',
    name: 'requ',
    component: () => import('../views/requ/index.vue')
  },
  {
    path: '/database',
    name: 'database',
    component: () => import('../views/database/index.vue')
  },
  {
    path: '/expert',
    name: 'expert',
    component: () => import('../views/expert/index.vue')
  },
  {
    path: '/invitation',
    name: 'invitation',
    component: () => import('../views/invitation/index.vue')
  },
  {
    path: '/certification',
    name: 'certification',
    component: () => import('../views/certification/index.vue')
  },
  {
    path: '/details',
    name: 'details',
    component: () => import('../views/details/index.vue')
  },
  {
    path: '/audit',
    name: 'audit',
    component: () => import('../views/audit/index.vue')
  },
  {
    path: '/friend',
    name: 'friend',
    component: () => import('../views/friend/index.vue')
  },
  {
    path: '/management',
    name: 'management',
    component: () => import('../views/management/index.vue')
  },
  {
    path: '/mybody',
    name: 'mybody',
    component: () => import('../views/mybody/index.vue')
  },
  {
    path: '/professional',
    name: 'professional',
    component: () => import('../views/professional/index.vue')
  },
  {
    path: '/sigup',
    name: 'sigup',
    component: () => import('../views/signup/index.vue')
  },
  {
    path: '/dance',
    name: 'dance',
    component: () => import('../views/dance/index.vue')
  },
  {
    path: '/',
    component: () => import('../views/layout/index.vue'),
    children: [
      { path: '/my', component: () => import('../views/my/index.vue') },
      { path: '', component: () => import('../views/home/index.vue') }
    ]
  }
  // {
  //   path: '/about',
  //   name: 'About',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  // }
]

const router = new VueRouter({
  routes
})

export default router
